BUNDLE = rbarreiros-tilt.lv2
INSTALL_DIR = /usr/lib/lv2


$(BUNDLE): manifest.ttl tilt.ttl tilt.so
	rm -rf $(BUNDLE)
	mkdir $(BUNDLE)
	cp manifest.ttl tilt.ttl tilt.so $(BUNDLE)

tilt.so: tilt.cpp tilt.peg
	g++ -shared -fPIC -DPIC tilt.cpp `pkg-config --cflags --libs paq` -o tilt.so

tilt.peg: tilt.ttl
	lv2peg tilt.ttl tilt.peg

install: $(BUNDLE)
	mkdir -p $(INSTALL_DIR)
	rm -rf $(INSTALL_DIR)/$(BUNDLE)
	cp -R $(BUNDLE) $(INSTALL_DIR)

clean:
	rm -rf $(BUNDLE) tilt.so tilt.peg *~
